<table class="table table-bordered" id="webuser-lists-table" data-toggle="datagrid" data-options="{
    tableWidth: '100%',
    height: '100%',
    gridTitle : '工序列表',
    showToolbar: true,
    toolbarItem: 'add',
    local: 'remote',
    dataUrl: '/admin/system/role-list',
    linenumberAll: false,
    showLinenumber: false,
    filterThead: false,
    editUrl: '/admin/system/role-edit',
    editCallback:editCallback,
    delUrl:'/admin/system/role-delete',
    delPK: 'id',
    delConfirm: true,
}">
    <thead>
    <tr>
        <th data-options="{name:'name',align:'center',rule:'required'}">角色名</th>
        <th data-options="{name:'display_name',align:'center',rule:'required'}">角色中文名</th>
        <th data-options="{name:'description',align:'center'}">角色描述</th>
        <th data-options="{align:'center',width:200,render:permission_assignment}">设置节点</th>
    </tr>
    </thead>
</table>
<!--showEditbtnscol: '操作',-->
<script type="text/javascript">
    function editCallback( json ){
        BJUI.navtab('reload');
    }
    function permission_assignment(value, data)
    {
        var html      = '<button type="button" class="btn btn-info" data-toggle="navtab" data-options="';
            html      += '{id:\'system-role-menu-navtab\',title:\'设置节点\',';
            html      += 'fresh:true,width:570,';
            html      += 'url:\'/admin/system/role-menu\',data:{id:' + data.id + '}}';
            html      += '"> 设置节点</button>';
        return html
    }
</script>